package com.xuecheng.rabbitmq.config;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

/**
 * @author: gongfy
 * @create: 2020/7/15 16:45
 * @Params:
 * @Description:
 */

@SpringBootTest
@RunWith(SpringRunner.class)
public class demo {



    @Test
    public void qqq() throws FileNotFoundException {
        String path2 = this.getClass().getResource("/").getPath(); //classLoader.getResource("").getPath()
        System.out.println("---------------"+path2); //D:/Jamesfeiyue_code/xc_edu_server/rabbitmq-producer/target/classes/com/xuecheng/rabbitmq/config/
        File file2 = new File(path2);
        FileOutputStream os = new FileOutputStream(file2);
    }
}
